using UnityEngine;
using System.Collections;

public abstract class SubDisplay : IDisplay {
	
	public bool _render = true;
	public Rect _bounds = new Rect(0,0, 100, 100);
	
	public override Rect Dimension{
		get{
			Rect parentBounds = this.gameObject.transform.parent.GetComponent<IDisplay>().Dimension;
			return new Rect(_bounds.x + parentBounds.x, _bounds.y + parentBounds.y,	_bounds.width, _bounds.height);
		}
	}
	
	public override bool Render{
		
		get{
			return _render  && this.gameObject.transform.parent.GetComponent<IDisplay>().Render;
		}
		
		set {
			_render = value;
		}
	}

}
